1. Field of the Invention
The present invention relates to a calculator capable of calculating a function and displaying a graph of the function.
2. Description of the Related Art
There are many conventional calculators capable of visually displaying a graph of a function. To display the graph of the function in such calculators, a user first inputs the function to be processed by the calculator. For example, assume the following Equations (1) and (2) as functions to be processed. EQU Y=X.sup.2 (1) EQU Y=2X+3 (2)
The user instructs the calculator to display graphs of the functions. Upon the instruction, the calculator displays graphs of the functions in which the left and right ends of the display unit of the calculator corresponds to X.sub.min and X.sub.max of X-axis, and the lower and upper ends thereof corresponds to Y.sub.min and Y.sub.max of Y-axis, respectively. X.sub.min is a lower limit value of a display range of the X-axis of the graph, and X.sub.max is an upper limit value of the display range of the X-axis of the graph. Y.sub.min is a lower limit value of the display range of the Y-axis of the graph, and Y.sub.max is an upper limit value of the display range of the Y-axis of the graph. While each of X.sub.min, X.sub.max, Y.sub.min and Y.sub.max can be specified by a user, their initial values are preset for the time at which the calculator is used.
For example, Y.sub.min, X.sub.max, Y.sub.min and Y.sub.max are set at X.sub.min =-4.7, X.sub.max =4.7, Y.sub.min =-3.1 and Y.sub.max =3.1, respectively. For example, those numerical values are set such that "1" corresponds to 10 dots. Therefore, when the display unit is a display having, for example, 96 dots.times.64 dots, the graph is displayed using 31 dots allocated to each of regions above and below the X-axis and 47 dots allocated to each of regions to the left and right of the Y-axis.
However, even when the user wishes to have the graph of the functions displayed such that the relationship between the two functions as a whole can be properly understood from Equations (1) and (2): EQU Y=X.sup.2 (1) EQU Y=2X+3 (2)
which represent the two functions, X.sub.min, X.sub.max, Y.sub.min and Y.sub.max may be values which have no relationship with the relationship between the two functions. Therefore, the graph of the functions displayed in the above-described case does not necessarily provide proper understanding of the relationship between the two functions as a whole.
Further, when each of X.sub.min, X.sub.max, Y.sub.min and Y.sub.max is set before the graph of the functions is displayed, intersections (-1, -1) and (3, 9) can be easily obtained if the functions are simple like Equations (1) and (2): EQU Y=X.sup.2 (1) EQU Y=2X+3 (2)
Therefore, X.sub.min, X.sub.max, Y.sub.min and Y.sub.max can be set at appropriate values which allow understanding of the relationship between the two functions as a whole. However, when a graph of a plurality of complicated functions is to be displayed on the calculator, it is difficult to recognize intersections in the graph of the complicated functions, i.e., intersections of lines representing sets of points having values (x, y) defined by the complicated functions as their coordinates and an image of the graph as a whole, and it is therefore difficult to set X.sub.min, X.sub.max, Y.sub.min and Y.sub.max properly.
As a result, when the complicated functions are displayed, X.sub.min, X.sub.max, Y.sub.min and Y.sub.max may provide no display on the display unit. In other words, in this case, the lines representing the points at coordinates defined by the complicated functions are not displayed on the display unit. In this case, the user must set the values X.sub.min, X.sub.max, Y.sub.min and Y.sub.max from the state of no display through repeated trial and error, which has been very inconvenient.
One of conventional techniques for calculators capable of displaying a graph of a function is disclosed in Japanese Unexamined Patent Publication JP-A 62-186347 (1987). The compact electronic calculator having a graph display function in this publication displays a graph on its display unit. To enlarge the graph, the operator presses a tablet overlaid on the display unit such that the locus of points touched with his or her finger forms a closed line. The calculator enlarges the region of the graph which is enclosed by the locus. To reduce the graph, the operator again presses the tablet such that the locus of points touched with his or her finger forms a closed line. The calculator reduces the graph such that the entire graph is displayed inside the region enclosed by the locus in the display unit. Even this calculator may fail to display a line representing points at coordinates defined by the function on the display unit when the graph is initially displayed, depending on the function to be processed. In this case, it is difficult to enlarge or reduce the graph to display the line.